home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / emacs16d.zip / _STARTUP.MIN < prev    next >
Text File  |  1992-01-28  |  5KB  |  243 lines

  1.  
  2.  
  3.  
  4. Name:F&setup
  5. Executed immediately after the fundamental library is loaded.
  6. *** Be *very* careful editing this.  If you break it, you can end up with an
  7. unusable emacs.ed file, because keys.ed gets loaded fairly late in the process,
  8. and if keys.ed doesn't get loaded, you can't do any editing.  You can recover
  9. using #(M:compare-ed), or else you can restore emacs.ed from emacs.tmp.
  10. [*]#(ds,lib-list,F)
  11. #(ds,k,##(gs,Fredisplay,#(Farglist)))
  12. #(mp,k,#(Farglist))
  13. #(ds,d,##(gs,Fcmd,#(Farglist)))
  14. #(mp,d,#(Farglist))
  15. #(ds,g,##(gs,Fget-key))
  16. #(ds,dflta,##(gs,Fdflta,#(Farglist)))
  17. #(mp,dflta,#(Farglist))
  18. #(st,Fsyntax)
  19. #(Fset-variables)
  20. #(Fcreate-buffer-one)
  21. #(Fset-modename,Fun)
  22. #(Fmultiple,Fload-lib,##(F-libs-to-load),SELF)
  23. #(Fparse-cmdline)
  24. #(==,##(ba,2),0,(
  25.     #(Ffind-unused-buffer,*scratch*)
  26.     #(==,##(ba,2),0,(
  27.         #(ow,Insufficient memory)
  28.         #(hl,2)
  29.     ))
  30.     #(Fmode-line)
  31.     #(n?,Fcompile-everything,(
  32.         #(Fcompile-everything)
  33.     ),(
  34.         #(ow,#(F&setup-msg))
  35.         #(ds,temp,#(g))
  36.         #(==,##(temp), ,,(
  37.             #(Fkbd-in,##(temp),x)
  38.         ))
  39.     ))
  40. ))
  41. #(rd,a)
  42. #(==,##(F-real-location),,,(
  43.     #(ds,env.EMACS,##(F-real-location))
  44. ))[*]
  45.  
  46.  
  47. Name:F&setup-msg
  48. [*]Press #(Khelp) for help.  ((`C-' means use CTRL key.))(
  49.  
  50. )Freemacs comes with ABSOLUTELY NO WARRANTY; type #(Khelp) C-w for full details.(
  51. )You may give out copies of Freemacs; type #(Khelp) C-c to see the conditions.(
  52. )Press #(Khelp) C-d for information on getting the latest version.(
  53. )Press #(Khelp) t for a tutorial on using Freemacs.(
  54. )Enter M-x edit-options to customize Freemacs.[*]
  55.  
  56.  
  57. Name:F:quoted-insert
  58. Insert a control character.
  59. [*]    
  60. #(ds,temp,#(Fquoted-char))
  61. #(Floop,(#(is,##(gs,temp))),#(==,arg1,,1,arg1))
  62. [*]
  63.  
  64.  
  65. Name:F:ring-the-bell
  66. Ring the bell.
  67. [*]    #(bl)#(Fmessage,Quit)[*]
  68.  
  69.  
  70. Name:Fcmd
  71. This is used to define the string #(d), which executes keys.
  72. [*]#(ds,result,
  73. #(#(hk,K.arg1,Fself-insert,arg1))
  74. )[*]
  75.  
  76.  
  77. Name:Fcreate-buffer-one
  78. Set up buffer one.  This is only done once in F&setup.
  79. [*]#(ds,old-buffer,##(ba,-1))
  80. #(..,##(ba,1))
  81. #(sp,[)
  82. #(dm,])
  83. #(pm,-26)
  84. #(pm,9)
  85. #(..,#(SELF-do,0,8))
  86. #(ds,reg.marks,#(SELF-do,A,[))
  87. #(..,##(ba,##(old-buffer)))
  88. [*]
  89.  
  90.  
  91. Name:Fcreate-buffer-one-do
  92. Enter with arg1 = first mark to set.  Exit when arg1 == arg2.
  93. Return the list of all args.
  94. [*]arg1
  95. #(is,arg1)#(sm,arg1,<)
  96. #(==,arg1,arg2,,(
  97.     #(SELF,##(bc,##(++,##(bc,arg1),1),d,a),arg2)
  98. ))[*]
  99.  
  100.  
  101. Name:Fcrlf
  102. Insert a newline into the buffer.
  103. [*]#(is,(
  104. ))[*]
  105.  
  106.  
  107. Name:Fdflta
  108. [*]#(ds,dflta-n,SELF)
  109. #(ds,dflta-n,Fautoload-##(go,dflta-n))
  110. #(n?,##(dflta-n),(
  111.     #(an,Autoloading ##(##(dflta-n)))
  112.     #(Fload-lib,##(##(dflta-n)))
  113.     #(gs,SELF,(SELF),(arg1),(arg2),(arg3),(arg4),(arg5),(arg6),(arg7),(arg8),(arg9))
  114. ))[*]
  115.  
  116.  
  117. Name:Ffilename
  118. This is the filename that we store the fundamental library in.
  119. [*]emacs[*]
  120.  
  121.  
  122. Name:Fparse-cmdline
  123.     Read command line arguments. This function should be called
  124. >from F&setup, replacing the four lines that currently deal with
  125. reading filenames from the commandline.
  126.  
  127.    (written wjm 3/13)
  128.  
  129.     This allows the following options on the command line
  130.     <filename>    loads a file.
  131.     +nnn <filename>    loads a file, then moves to line nnn in that file.
  132.     -f <command>    run the command <command>
  133.  
  134. Test:
  135. #(ds,env.RUNLINE,( ab    c -f newline))#(Fparse-cmdline)
  136. #(ds,env.RUNLINE,( -f newline))#(Fparse-cmdline)
  137. [*]
  138. #(ds,argv,##(env.RUNLINE))
  139. #(mp,argv,, ,(    ))
  140. #(ds,argv,##(argv,(,),(,))(,))
  141. #(SELF-do)
  142. #(es,argv)
  143. [*]
  144.  
  145.  
  146. Name:Fparse-cmdline-do
  147.     [wjm 3/13/90]
  148.     [4/1/90] - used new functionbreak-first, fixed bug in -f case.
  149. [*]
  150. #(ds,temp,#(Fbreak-first,argv,(,)))
  151. #(==,##(temp),,,(
  152.     #(Fcase,##(go,temp),
  153.         (+,(
  154.             #(ds,goto-line,##(temp))
  155.         )),
  156.         (-,(#(Fcase,##(go,temp),
  157.             (f,(
  158.                 #(ds,temp,#(Fbreak-first,argv,(,)))
  159.                 #(==,##(temp),,(
  160.     #(Ferror, Usage: -f <function to execute>)
  161.                 ),(
  162.                     #(Fresolve-name,##(temp),(
  163.                         #(##(temp))
  164.                     ))
  165.                 ))
  166.             )),
  167.             (
  168.     #(Ferror, bad option #(rs,temp) [##(temp)])
  169.             )
  170.         ))),
  171.         (
  172.             #(rs,temp)#(F:find-file,##(temp))
  173.             #(n?,goto-line,(
  174.                 #(sv,cl,##(goto-line))
  175.                 #(es,goto-line)
  176.             ))
  177.         )
  178.     )
  179.     #(SELF)
  180. ))
  181. [*]
  182.  
  183.  
  184. Name:Fredisplay
  185. This is the prototype for #(k).
  186. [*]#(rd)#(==,##(it,0),Timeout,(#(Fmode-line)
  187.     #(n?,mode-hook,(
  188.         #(mode-hook)
  189.     ))
  190. ))[*]
  191.  
  192.  
  193. Name:Fredisplay-two
  194. This is the prototype for #(k) when in two window mode.
  195. [*]#(rd)#(==,##(it,0),Timeout,(
  196.     #(ba,##(lv,ow))
  197.     #(==,##(lv,cw),1,(#(sv,cw,2)),(#(sv,cw,1)))
  198.     #(Fmode-line)
  199.     #(ba,##(lv,ow))
  200.     #(==,##(lv,cw),1,(#(sv,cw,2)),(#(sv,cw,1)))
  201.     #(Fmode-line)
  202.     #(n?,mode-hook,(
  203.         #(mode-hook)
  204.     ))
  205. ))[*]
  206.  
  207.  
  208. Name:Fsearch-path
  209. Search the path for an executable program named in arg1.
  210. [*]#(SELF-do,arg1,##(fm,env.PATH,;,(##(gn,env.PATH,1000))))
  211. #(rs,env.PATH)
  212. [*]
  213.  
  214.  
  215. Name:Fsearch-path-do
  216. [*]#(==,arg2,,,(
  217.     #(==,#(ff,arg2\arg1.com,;),,(
  218.         #(==,#(ff,arg2\arg1.exe,;),,(
  219.             #(SELF,arg1,##(fm,env.PATH,;,(##(gn,env.PATH,1000))))
  220.         ),(
  221.             arg2\arg1.exe
  222.         ))
  223.     ),(
  224.         arg2\arg1.com
  225.     ))
  226. ))
  227. [*]
  228.  
  229.  
  230. Name:Fself-insert
  231. Insert a single character.
  232. [*]#(n?,Fkey2char.arg1,(
  233.     #(SELF,##(Fkey2char.arg1))
  234. ),(
  235.     #(==,##(nc,arg1),1,(
  236.         #(Fin-minor-mode,Overwrite,(
  237.             #(==,##(rc,$),0,,(#(dm,>)))
  238.         ))
  239.         #(is,arg1)
  240.     ),(
  241.         #(bl)
  242.     ))
  243. ))[*]